import { ApiProperty } from '@nestjs/swagger';

export class UserItem {
  @ApiProperty({ description: '用户id', example: 1 })
  id: number;

  @ApiProperty({ description: '用户昵称', example: '张三' })
  nickname: string;

  @ApiProperty({ description: '用户手机号', example: '12345678901' })
  mobile: string;

  @ApiProperty({ description: '用户创建时间', example: '2021-01-01 00:00:00' })
  createTime: Date;

  @ApiProperty({ description: '用户更新时间', example: '2021-01-01 00:00:00' })
  updateTime: Date;
}

export class UserItemResponse {
  @ApiProperty({ description: '响应状态码', example: 200 })
  code: number;

  @ApiProperty({ description: '响应信息', example: 'success' })
  message: string;

  @ApiProperty({ description: '数据', type: () => UserItem, example: UserItem })
  data: UserItem;
}
